<?php
require_once 'modules/user/models/User.php';
class logoSticker extends Nine_Sticker {
	public function run()
	{
		$objUser = new Models_User();
		if (1 == @Nine_Registry::getLoggedInGroupId()){
			$user = @Nine_Registry::getLoggedInUser()->toArray();
		}
		else if (2 == @Nine_Registry::getLoggedInGroupId()) {
			$user = $objUser->getUserWithMerchantProfile(Nine_Registry::getLoggedInUserId());
//			$this->view->historyTransactionUrl = Nine_Registry::getAppBaseUrl()."merchant"; 
		}
		else if (3 == @Nine_Registry::getLoggedInGroupId()) {
			$user = $objUser->getUserWithConsumerProfile(Nine_Registry::getLoggedInUserId());
//			$this->view->historyTransactionUrl = Nine_Registry::getAppBaseUrl()."consumer"; 
		}
		else {
			$user = null;
		}
		
		$this->view->user = $user;
		$this->view->historyTransactionUrl = Nine_Route::_(Nine_Registry::getAppBaseUrl() . "transaction/index/manage");
	}
}
